import request from '@/utils/request'

// 获取员工简单列表
export function getEmployeeSimple() {
  return request({
    method: 'get',
    url: '/sys/user/simple'
  })
}

// 获取员工列表
export function getEmployeeList(params) {
  return request({
    method: 'get',
    url: '/sys/user/',
    params
  })
}

// 批量导入员工表单
export function importEmployees(data) {
  return request({
    method: 'post',
    url: '/sys/user/batch',
    data
  })
}

// 删除员工表单
export function DelEmployees(id) {
  return request({
    method: 'delete',
    url: '/sys/user/' + id
  })
}

// 新增员工表单
export function Addmployees(data) {
  return request({
    method: 'post',
    url: '/sys/user/',
    data
  })
}

// 更新员工信息
export function updateEmployee(data) {
  return request({
    method: 'put',
    url: '/sys/user/'+data.id,
    data
  })
}

// 角色分配权限
export function AssignEmployee(data) {
  return request({
    method: 'put',
    url: '/sys/user/assignRoles',
    data
  })
}
